package com.ztools.common.model.pc.information;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ztools.common.model.pc.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author:seeTools
 * @Date: 2023/4/14  19:52
 * @Version 1.0
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("we_chat_member")
public class WeChatMember extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 会员昵称
     */
    private String nickName;

    /**
     * 真实姓名
     */
    private String name;

    /**
     * 电话
     */
    private String phone;

    /**
     * 性别
     */
    private Integer sex;

    /**
     * 性别名称
     */
    @TableField(exist = false)
    private String sexName;

    /**
     * 注册日期
     */
    private Date registrationDate;

    /**
     * 注册来源
     */
    private String registrationSource;

    /**
     * openid
     */
    private String openid;

    /**
     * unionId
     */
    private String unionId;

    /**
     * 推荐人openid
     */
    private String referrerOpenid;

    /**
     * 经度
     */
    @JSONField(format = "#0.00")
    private BigDecimal longitude;

    /**
     * 纬度
     */
    @JSONField(format = "#0.00")
    private BigDecimal latitude;

    /**
     * 省份
     */
    private String province;

    /**
     * 城市
     */
    private String city;

    /**
     * 粉丝状态
     */
    private Integer memberStatus;

    /**
     * 粉丝状态
     */
    @TableField(exist = false)
    private String memberStatusName;

    /**
     * 累积积分
     */
    private Integer totalPoints;

    /**
     * 累积消费金额
     */
    @JSONField(format = "#0.00")
    private BigDecimal totalConsumptionAmount;

    /**
     * 累积优惠金额
     */
    @JSONField(format = "#0.00")
    private BigDecimal totalDiscountAmount;

    /**
     * 累计退款金额
     */
    @JSONField(format = "#0.00")
    private BigDecimal totalRefundAmount;

    /**
     * 累积消费次数
     */
    private Integer totalConsumptionTimes;

    /**
     * 累积退款次数
     */
    private Integer totalRefundTimes;
}
